< previous page page_266 next page >

Page 266
Table 13.3 Methods of the Recordset Object.
MethodDescription
AddNewAdds a new record to the recordset.
CancelUpdateCancels a pending AddNew or Edit method.
CloseCloses a recordset.
DeleteDeletes the current record.
FindFinds a particular record in a recordset based on a search string. If the record youre searching for doesnt exist, the recordset will be placed at the end of the file.
MoveFirstMoves to the first record in the recordset.
MoveLastMoves to the last record in the recordset.
MoveNextMoves to the next record in the recordset.
MovePreviousMoves to the previous record in the recordset.
RequeryRebuilds the complete recordset by rereading the data from the table in the database. You might do this when there are many users changing data at the same time. This allows you to see the other users additions and/or changes.
UpdateUpdates the current record with the values in the controls.

Events of the ADO Data Control
The ADO data control has a lot of events that are fired when you perform operations on the data control, the recordset, and even the fields. You need to learn about the different events as well as the order in which those events occurthis will be paramount to you using the data control efficiently. Most of the events youll learn about in the ADO data control have a before and an after event. The before events start with the word Will, and the after events end with the word Complete in the name of the event (see Table 13.4).
Table 13.4 Events of the ADO Data Control.
EventDescription
EndOfRecordsetThis event fires when youre at the end of the Recordset object.
ErrorThis event fires when an error occurs when the user attempts to access the data source or the records in the recordset.

(table continued on next page)

 
< previous page page_266 next page >

If you like this book, buy it!